home *** CD-ROM | disk | FTP | other *** search
/ Take-Home Tutor en Espanol / TakeHomeTutor.iso / pc / En espanol / Take-Home Tutor 3 / flipcard_u3e2.swf / scripts / DefineButton2_151 / BUTTONCONDACTION on(release).as
Encoding:
Text File  |  2003-10-29  |  1.7 KB  |  48 lines

  1. on(release){
  2.    if(activeMCList.length > 1)
  3.    {
  4.       stopAllSounds();
  5.       tellTarget("_root.dynamicbuttonMc")
  6.       {
  7.          gotoAndStop(1);
  8.       }
  9.       if(passiveMC <= _root.activeTotal and passiveMC > 1)
  10.       {
  11.          passiveMC -= 1;
  12.       }
  13.       else if(passiveMC = 1)
  14.       {
  15.          passiveMC = _root.activeTotal;
  16.       }
  17.       if(_root.direction eq "forward")
  18.       {
  19.          _root.activeMC = _root.activeMCList.pop();
  20.          _root.activeMClist.unshift(_root.activeMC);
  21.          _root.activeMC = _root.activeMCList.pop();
  22.          _root.activeMClist.unshift(_root.activeMC);
  23.       }
  24.       else if(_root.direction eq "backward")
  25.       {
  26.          _root.activeMC = _root.activeMCList.pop();
  27.          _root.activeMClist.unshift(_root.activeMC);
  28.       }
  29.       tellTarget("_root.dynamicbuttonMc")
  30.       {
  31.          setProperty("frontAudioInstance", _visible, false);
  32.          setProperty("backAudioInstance", _visible, false);
  33.          setProperty("frontImageHolderInstance", _visible, false);
  34.          setProperty("backImageHolderInstance", _visible, false);
  35.          var question = _root.frontArray[_root.activeMC];
  36.          var answer = _root.backArray[_root.activeMC];
  37.          var frontAudio = _root.frontAudioArray[_root.activeMC];
  38.          var backAudio = _root.backAudioArray[_root.activeMC];
  39.          var frontImage = _root.frontImageArray[_root.activeMC];
  40.          var backImage = _root.backImageArray[_root.activeMC];
  41.          setProperty("_root.flipcursor1", _visible, false);
  42.          gotoAndPlay(1);
  43.       }
  44.       cardlisting = "Tarjeta: <font color =\"#6868CE\">" + _root.passiveMC + "</font>" + " de " + "<font color =\"#6868CE\">" + _root.activeTotal + "</font>";
  45.    }
  46.    _root.direction = "backward";
  47. }
  48.